package com.neu.edu.boonpay.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor())
                .addPathPatterns("/**");   // 指定拦截的路径模式，例如这里拦截所有路径
                //.excludePathPatterns("/health", "/metrics") // 排除某些路径，例如健康检查和指标路径
    }
}
